﻿/*
 * 文件功能描述：后台—短信接口
 * 创建者：曹志平
 * 创建时间：2013-01-31 09:29:52
 * 
 * 修改时间：
 * 修改者：
 * 修改描述：
*/
using System;
using System.Collections.Generic;
using System.Text;
using  Model;
using System.Data.SqlClient;

namespace Data
{

    public class DalMallSmsPort
    {
        private DataAccess Access = new Data.DataAccess();
        public DalMallSmsPort() { }
        protected string primaryKey = "MallSmsPortID";
        /// <summary>
        /// 抽出一条记录
        /// </summary>
        /// <param name="id">主键的值</param>
        /// <returns></returns>
        public MallSmsPort Get()
        {
            string sql = "select top 1 * from TB_MallSmsPort";
            return  Access.Get<MallSmsPort>(sql, null);
        }



        /// <summary>
        /// 更新当前TB_MallSmsPort对象
        /// </summary>
        /// <param name="MallSmsPort">欲更新的MallSmsPort</param>
        /// <returns></returns>
        public bool Update(MallSmsPort mallsmsport)
        {
            return  Access.Update<MallSmsPort>(mallsmsport, primaryKey)>0;
        }

    }
}
